﻿@{
    ViewBag.Title = "Music Player For Html5";
}
@section head{
    @ViewHelper.Css("/css/main/home.css")
    @ViewHelper.JavaScript("/js/main/home.js")
}

<h2>复制虾米播放器的地址到下面</h2>
<br />
<textarea id="txt_url"></textarea>
<br />
<input type="button" id="btn_sumbit" value="Open" />
<div class="clearall"></div>
<h2>分享人</h2>
<div class="player_list">
    @PlayerUrls(ViewBag.List ?? null)
</div>


@helper PlayerUrls(List<Html5Music.Model.User> list)
{
    if (list == null)
    {
        return;
    }
    
    <text>
    <ul>
        @{
            foreach (var item in list)
            {
                string url = string.Format("/u/{0}", item.LoginName);
            <text>
            <li>
                <a href="@(url)" target="_blank">@(item.UserName)</a>
            </li>
            </text>
            }
        }
    </ul>
    </text>
}